<?php defined('RUN_KATANA') or die('Restricted access'); ?>
<?php echo $commander->getListCommandsPanel('s', ''); ?>
<fieldset class="edit_form">
    <label for="title"><?php echo ucfirst($txt->getWord('title')); ?></label>
    <?php 
        if($error['title'])
        { echo '<span class="error">'.$error['title'].'</span>'; }
        if($error['info'])
        { echo '<span class="info">'.$info['title'].'</span>'; }
    ?>
    <input name="title" class="large" type="text" value="<?php echo $shop->CurrentProduct->Title; ?>" maxlength="60">
    <?php if($shopCom->ShopSettings['brands']): ?>
    <label for="brand"><?php echo ucfirst($txt->getWord('brand')); ?></label>
    <select name="brand" class="large" onchange="submit();">
        <option value="0"><?php echo ucfirst($txt->getWord('select')).' '.ucfirst($txt->getWord('brand')); ?></option>
        <?php
        if($brands)
        {
            foreach($brands as $brand)
            { echo '<option value="'.$brand['id'].'" '.getIsSelectedHTML($brand['id'], $shop->CurrentProduct->Brand).'>'.$brand['title'].'</option>'; }
        }
        ?>
    </select><!--
    <input name="new_brand" class="large" type="text" value="" maxlength="80" size="10">
    <img src="../images/system/icons/page_new.gif" class="command" />-->
    <?php endif; ?>
    <?php if($shopCom->ShopSettings['provider']): ?>
    <label for="provider"><?php echo ucfirst($txt->getWord('provider')); ?></label>
    <select name="provider" class="large" onchange="submit();">
        <option value="0"><?php echo ucfirst($txt->getWord('select')).' '.ucfirst($txt->getWord('provider')); ?></option>
        <?php
        if($providers)
        {
            foreach($providers as $provider)
            { echo '<option value="'.$provider['id'].'" '.getIsSelectedHTML($provider['id'], $shop->CurrentProduct->Provider).'>'.$provider['title'].'</option>'; }
        }
        ?>
    </select><!--
    <input name="new_provider" class="large" type="text" value="" maxlength="80" size="10">
    <img src="../images/system/icons/page_new.gif" class="command" />-->
    <?php endif; ?>
    <?php if ($shop->getGlobalSetting('categories')): ?>
    <label for="cat_id"><?php echo ucfirst($txt->getWord('category')); ?></label>
    <select name="cat_id" class="large" onchange="submit();">
        <option value="0"><?php echo ucfirst($txt->getWord('select')).' '.ucfirst($txt->getWord('category')); ?></option>
        <?php
		if($shop->getCats())
		{
			foreach($shop->getCats() as $cat)
			{ echo '<option value="'.$cat->getId().'" '.getIsSelectedHTML($cat->getId(), $shop->CurrentProduct->CatId).'>'.$cat->getTitle().'</option>'; }
		}
        ?>
    </select>
    <?php endif; ?>
    <?php if ($shop->getGlobalSetting('groups')): ?>
    <label for="group_id"><?php echo ucfirst($txt->getWord('product')).' '.ucfirst($txt->getWord('group')); ?> </label>
    <select name="group_id" class="large" onchange="submit();">
        <option value="0"><?php echo ucfirst($txt->getWord('select')).' '.ucfirst($txt->getWord('group')); ?></option>
        <?php
        if($shop->getGroups())
        {
            foreach($shop->getGroups() as $group)
            { echo '<option value="'.$group->getId().'" '.getIsSelectedHTML($group->getId(), $shop->CurrentProduct->GroupId).'>'.$group->getTitle().'</option>'; }
        }
        ?>
    </select>
    <?php endif; ?>
    <?php if ($shop->getGlobalSetting('use_tax')): ?>
    <label for="tax_id"><?php echo ucfirst($txt->getWord('tax')).' '.ucfirst($txt->getWord('group')); ?></label>
    <select name="tax_id" class="large" onchange="submit();">
        <option value="0"><?php echo ucfirst($txt->getWord('select')).' '.ucfirst($txt->getWord('tax').' '.$txt->getWord('group')); ?></option>
        <?php
        if($shop->getTaxGroups())
        {
            foreach($shop->getTaxGroups() as $tax)
            { echo '<option value="'.$tax['id'].'" '.getIsSelectedHTML($tax['id'], $shop->CurrentProduct->TaxId).'>'.$tax['title'].' ('.(($tax['tax']-1)*100).'%)</option>'; }
        }
        ?>
    </select>
    <?php endif; ?>
    <?php 
	/*
    <label for="price_tax_inc"><?php echo ucfirst($txt->getWord('price')); ?> (<?php echo ucfirst($txt->getWord('inc').'. '.$txt->getWord('tax')); ?>)</label>
    <?php 
	/*
        if($error['price_tax_inc'])
        { echo '<span class="error">'.$error['price_tax_inc'].'</span>'; }
        if($error['info'])
        { echo '<span class="info">'.$info['price_tax_inc'].'</span>'; }
    ?>
    <input name="price_tax_inc" class="large numeric price price_tax_inc" type="text" value="<?php echo $shop->CurrentProduct->getPrice(true); ?>" maxlength="12">
    <label for="price_tax_excl"><?php echo ucfirst($txt->getWord('price')); ?> (<?php echo ucfirst($txt->getWord('excl').'. '.$txt->getWord('tax')); ?>)</label>
    <?php 
        if($error['price'])
        { echo '<span class="error">'.$error['price_tax_excl'].'</span>'; }
        if($error['info'])
        { echo '<span class="info">'.$info['price_tax_excl'].'</span>'; }
    ?>
    <input name="price_tax_excl" class="large numeric price price_tax_excl" type="text" value="<?php echo $shop->CurrentProduct->getPrice(false); ?>" maxlength="12">
    
	
	*/
	?>
    <label for="start_date"><?php echo ucfirst($txt->getWord('status')); ?></label>
    <select name="active" class="small">
    	<option value="1" <?php echo getIsSelectedHTML($shop->CurrentProduct->Active, 1);  ?>><?php echo ucfirst($txt->getWord('activated')); ?></option>
		<option value="0" <?php echo getIsSelectedHTML($shop->CurrentProduct->Active, 0);  ?>><?php echo ucfirst($txt->getWord('deactivated')); ?></option>
    </select>
    <label for="start_date"><?php echo ucfirst($txt->getWord('activation')); ?></label>
    <input id="start_date" class="small date_pick" size="10" name="act_date" type="text" value="<?php echo substr($shop->CurrentProduct->ActiveStart, 0, 10); ?>" maxlength="10" />
    <select name="act_hh" class="xsmall">
    <?php
    for($i=0; $i<24; $i++)
    {
        $text = $i;
        
        if($i < 10)
        { $text = '0'.$text; }
        
        $item['prod_act_hh'] = substr($shop->CurrentProduct->ActiveStart, 11, 8);
        
        if(intval($item['prod_act_hh']) == $i)
        { echo '<option value="'.$i.'" selected>'.$text.':00</option>'; }
        else
        { echo '<option value="'.$i.'">'.$text.':00</option>'; }
    }
    ?>
    </select>
    <label for="end_date"><?php echo ucfirst($txt->getWord('deactivation')); ?></label>
    <input id="end_date" class="small date_pick" size="10" name="deac_date" type="text" value="<?php echo substr($shop->CurrentProduct->ActiveEnd, 0, 10); ?>" maxlength="10" />
    <select name="deac_hh" class="xsmall">
        <?php
        for($i=0; $i<24; $i++)
        {
            $text = $i;
            
            if($i < 10)
            { $text = '0'.$text; }
            
            $item['prod_deac_hh'] = substr($shop->CurrentProduct->ActiveEnd, 11, 2);
            
            if(intval($item['prod_deac_hh']) == $i)
            { echo '<option value="'.$i.'" selected>'.$text.':00</option>'; }
            else
            { echo '<option value="'.$i.'">'.$text.':00</option>'; }
        }
        ?>
    </select><?php //echo $commander->getActivationFields($item); ?><br /><br />
    <label for="intro"><?php echo ucfirst($txt->getWord('intro')); ?> (<?php echo ucfirst($txt->getWord('list_display')); ?>)</label>
    <?php 
        if($error['intro'])
        { echo '<span class="error">'.$error['intro'].'</span>'; }
        if($error['info'])
        { echo '<span class="info">'.$info['intro'].'</span>'; }
    ?>
    <textarea name="intro" class="xxlarge <?php if($shop->getSetting('list_view_editor') > 0){ echo 'tinymce_mini'; } ?>" style="height:100px;"><?php echo $shop->CurrentProduct->getIntro(); ?></textarea><br /><br />
	<label for="Description"><?php echo ucfirst($txt->getWord('description')); ?></label>
    <?php 
        if($error['Description'])
        { echo '<span class="error">'.$error['Description'].'</span>'; }
        if($error['Description'])
        { echo '<span class="info">'.$info['Description'].'</span>'; }
    ?>
    <div class="a4">
    <textarea name="Description" class="xxlarge tinymce_mini" style="height:100px;"><?php echo $shop->CurrentProduct->getDescription(); ?></textarea>
    <?php echo $shop->CurrentProduct->getDescription(); ?>
    </div>
    <?php if ($shop->getGlobalSetting('detail_txt')): ?>
    <label for="details"><?php echo ucfirst($txt->getWord('details')); ?></label>
    <?php 
        if($error['details'])
        { echo '<span class="error">'.$error['details'].'</span>'; }
        if($error['details'])
        { echo '<span class="info">'.$info['details'].'</span>'; }
    ?>
    <div class="a4">
    <textarea name="details" class="xxlarge tinymce_mini" style="height:100px;"><?php echo $shop->CurrentProduct->getDetails(); ?></textarea>
    </div><br /><br />
    <?php endif; ?>
</fieldset>